package com.zimomo.exp2;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.event.ApplicationEventMulticaster;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest
public class Tests {

    @Autowired
    ApplicationEventMulticaster applicationEventMulticaster;

    @Test
    public void testMyEventMulticaster() throws InterruptedException {
        applicationEventMulticaster.multicastEvent(new myAutoConfig.myNoticeEvent("东莞理工学院"));
        applicationEventMulticaster.multicastEvent(new myAutoConfig.myNoticeEvent("网安学院"));
        applicationEventMulticaster.multicastEvent(new myAutoConfig.myNoticeEvent("软卓1班"));

        Thread.sleep(3000);
    }
}
